import 'package:zfth/pages/home/homegrid/HomeGridLogic.dart';
import 'package:zfth/pages/home/homegrid/HomeGridState.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

class HomeGridPage extends StatelessWidget{
  const HomeGridPage({super.key});


  @override
  Widget build(BuildContext context) {
    final HomeGridState state = Get.find<HomeGridLogic>().state;
    return GetBuilder<HomeGridLogic>(
        builder: (logic){
          return Card(
            elevation: 0.2,
            color: Colors.white,
            margin: const EdgeInsets.fromLTRB(10, 10, 10, 0),
            child: Column(
                children: [
                  Container(
                    padding: const EdgeInsets.all(6),
                    width: double.infinity,
                    child: const Text("",textAlign:TextAlign.start,style:  TextStyle(fontSize: 16,fontWeight: FontWeight.bold),),
                  ),
                  GridView.count(
                    shrinkWrap: true,
                    physics: const NeverScrollableScrollPhysics(),
                    scrollDirection: Axis.vertical,
                    crossAxisCount: 3,//一行个数
                    childAspectRatio: 1.5,//宽高比
                    children:logic.gridItem(),
                  )
                ]
            ),


          );
        }

    );
  }

}